import threading
from app.services.rabbitmq_service import listen_to_queue

def start_listening():
    queue_name = "yx_queue"
    listen_to_queue(queue_name)

def start_listener_thread():
    listener_thread = threading.Thread(target=start_listening)
    listener_thread.daemon = True
    listener_thread.start()